System: Arch on raspberry pi

modprobe r8188eu to recognize the adapter

WPA setup:

Create /etc/wpa_supplicant/wpa.conf file

#/etc/wpa_supplicant/wpa.conf

ctrl_interface=/run/wpa_supplicant
update_config=1

wpa_passphrase <ssid> [passphrase] >> /etc/wpa_supplicant/wpa.conf ##appends wpa info to wpa.conf
ex.:
network={
        ssid="SSID"
        #psk="NetworkPassword"
        psk=Long key generated by wpa_passphrase  ## Will not be in quotes
}

Bash script to start wireless networking:

Location: /usr/local/bin/networkstart.sh

#!/bin/bash
ip link set wlan0 down
wpa_supplicant -B -iwlan0 -Dwext -c/etc/wpa_supplicant/wpa.conf
ip link set wlan0 up

Systemd service file:

Location: /usr/lib/systemd/system/networkstart.service

[Unit]
Description=Start wireless network 

[Service]
Type=forking
ExecStart=/usr/local/bin/networkstart.sh

[Install]
WantedBy=multi-user.target

systemctl enable networkstart.service

reboot

For a static IP address:

Location:  /etc/systemd/network/wlan0.network

[Match]
Name=wlan0

[Network]
Address=192.168.1.xxx/24
Gateway=192.168.1.xxx
DNS=8.8.8.8
DNS=4.4.4.4
